package ${packageName}.vo;

import lombok.Data;
<#if hasDate || hasTime || hasDatetime>
import com.fasterxml.jackson.annotation.JsonFormat;
</#if>
<#if hasDate>
import java.sql.Date;
</#if>
<#if hasTime>
import java.sql.Time;
</#if>
<#if hasDatetime>
import java.sql.Timestamp;
</#if>
<#if hasRegex>
import com.zg.common.core.validation.Regex;
</#if>
<#if hasNeed>
import javax.validation.constraints.NotNull;
</#if>

/**
* @author zg
*/
@Data
public class ${name}AddVo {
    <#list addList as pro>
    /**
    * ${pro.columnVo.comment}
    */
    <#if pro.genColumn.regex?? && pro.genColumn.regex!="">
    @Regex(message = "${pro.genColumn.errorMsg}",rule = "${pro.genColumn.regex}")
    </#if>
    <#if pro.genColumn.isNeed>
    @NotNull(message = "【${pro.columnVo.comment}】字段不能为NULL")
    </#if>
    <#if pro.genColumn.columnType == 'date'>
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd")
    </#if>
    <#if pro.genColumn.columnType == 'datetime'>
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    </#if>
    <#if pro.genColumn.columnType == 'time'>
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm:ss")
    </#if>
    private ${pro.shortTypeName} ${pro.name};
    </#list>
}
